# -*- coding: utf-8 -*-
from __future__ import print_function, division
#系统库
#第三方库
#自定义库


#主体
class User(object):
    US_NORMAL = 0
    US_READY = 1
    US_GAMING = 2
    US_LOST = 3
    US_NAME = ['normal', 'ready', 'gaming', 'lost']

    def __init__(self, u_id, name):
        self.u_id = u_id
        self.username = name
        self.current_room = None
        self.comet = None
        self.state = User.US_NORMAL
        return None

    def __str__(self):
        return str(dict(
            u_id=self.u_id,
            username=self.username,
            current_room=self.current_room,
            state=User.US_NAME[self.state]
            ))
